<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>e8通用后台</title>

<!-- 新 Bootstrap 核心 CSS 文件 -->
<link rel="stylesheet" href="__PUBLIC__/admin/default/lib/bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="__PUBLIC__/admin/default/lib/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="__PUBLIC__/admin/default/lib/jquery-confirm/jquery.confirm.css">

<!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

<!-- e8 style -->
<link rel="stylesheet" href="__PUBLIC__/admin/default/css/common.css">
<link rel="stylesheet" href="__PUBLIC__/admin/default/css/main.css">

</head>

<body>

    <div class="topbar">

        <!-- 面包屑 -->
        <include file="./Apps/Admin/View/Include/mbx.html" />

        <div class="topbar-search">
            <form class="form-inline" role="form">
                <div class="form-group">
                    <label class="sr-only" for="exampleInputEmail2">Email address</label>
                    <input type="email" class="form-control  input-sm"
                        id="exampleInputEmail2" placeholder="Enter email"> <i
                        class="fa fa-search color-gray"></i>
                </div>
            </form>
        </div>
    </div>
    <!-- /.topbar -->

    <div class="page-content">

        <div class="page-header col-sm-12">
            <h1>教师管理</h1>
        </div>

        <div class="col-sm-12">
            <div class="tabbable">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="__APP__/Teacher">教师管理</a></li>
                    <li><a href="__APP__/Teacher/add">添加老师 </a></li>
                </ul>

                <div class="tab-content">
                    <div class="tab-pane in active">
                        <p class="title background-blue">{$name}</p>

                        <form action="__APP__/Teacher/editTeacher" method="post">
                            <table class="table table-hover">
                                <tr>
                                    <th width="20">
                                       <input type="checkbox" id="checkbox" onclick='javascript:selectAll("id")'/>
                                    </th>  
                                    <th>ID</th>
                                    <th>姓名</th>
                                    <th>现任职务</th>
                                    <th>个人简介</th>
                                    <th>图片</th>
                                    <th class="align-center">操作</th>
                                </tr>
                                <foreach name="teacherList" item="teacher">
                                    <tr>
                                        <td><input type="checkbox" name="id" value="{$teacher.id}"/></td>
                                        <td>#{$key+1}</td>
                                        <td>{$teacher.name}</td>
                                        <td>{$teacher.position}</td>
                                        <td title="">
                                            {$teacher.introduction|subtitle=10,0}
                                        </td>
                                        <td>
                                            <img class="img-thumbnail" id="photo{$teacher.id}" src="{$Think.config.UPLOAD_PATH}{$teacher.photo}" alt="{$teacher.name}" width="30" height="30" onclick="showphoto('photo{$teacher.id}');">
                                        </td>
                                        <td class="align-center">
                                             <a href="__APP__/Teacher/view/id/{$teacher.id}">查看</a>|&nbsp;
                                            <a href="__APP__/Teacher/edit/id/{$teacher.id}/mw/{$teacher.mw}">修改</a>|&nbsp; 
                                            <a href="javascript:void(0);" onclick="return confirm('__APP__/Teacher/del/id/{$teacher.id}','确定删除?');">删除</a>
                                        </td>
                                    </tr>
                                </foreach>
                            </table>
                        </form>
                    </div>
                    <div class="pageBar">{$page}</div>
                    <div style="width:100%;height:60px;"></div>
                    <div class="admin-add">
                        <button class="btn btn-primary btn-sm" type="button" onclick="javascript:treatCon('__APP__/Teacher/Del')">删除</button>
                    </div>
                </div>
            </div>
        </div>
        <!-- /span -->

    </div>
    <!-- /.page-content -->

    <!-- 图片弹出层 -->
    <div id="outerdiv"
        style="position: fixed; top: 0; left: 0; background: rgba(0, 0, 0, 0.7); z-index: 10000; width: 100%; height: 100%; display: none;">
        <div id="innerdiv" style="position: absolute;">
            <img id="bigimg" style="border: 5px solid #fff;" src="" />
        </div>
    </div>

    <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="__PUBLIC__/admin/default/lib/bootstrap/bootstrap.min.js"></script>
    <script src="__PUBLIC__/admin/default/lib/jquery-confirm/jquery.confirm.js"></script>
    <!--  -->
    <script src="__PUBLIC__/admin/default/js/fun.js"></script>
    <script src="__PUBLIC__/admin/default/js/e8.js"></script>

    <script>
    function showphoto(obj){
        var _obj = obj;
        var _this = $("#"+_obj);
        imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);
    }
    </script>

</body>
</html>
